# Contributor: Leo <thinkabit.ukim@gmail.com>
# Maintainer:
pkgname=kvantum
pkgver=1.0.2
pkgrel=0
pkgdesc="SVG-based theme engine for Qt5"
options="!check" # No testsuite
url="https://github.com/tsujan/Kvantum"
arch="all !armhf" # Limited by kwindowsystem-dev
license="GPL-2.0-or-later"
depends="hicolor-icon-theme"
makedepends="
	cmake
	kwindowsystem-dev
	libx11-dev
	libxext-dev
	qt5-qtbase-dev
	qt5-qtsvg-dev
	qt5-qttools-dev
	qt5-qtx11extras-dev
	samurai
	"
source="$pkgname-$pkgver.tar.gz::https://github.com/tsujan/Kvantum/archive/V$pkgver/kvantum-$pkgver.tar.gz"
builddir="$srcdir/Kvantum-$pkgver/Kvantum"

build() {
	if [ "$CBUILD" != "$CHOST" ]; then
		CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
	fi
	cmake -B build -G Ninja \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DBUILD_SHARED_LIBS=True \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DENABLE_QT4=OFF \
		$CMAKE_CROSSOPTS
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
	rm -rf "$pkgdir"/usr/share/kde4
}

sha512sums="
da9a1d4f9cd3d961598deb599c5f7a2906be88ace4ed27c5f7bfa2462467c90b8a9458c3bb8595591129db01f248ceb4f7abc5f4057df650741f1345f741ce22  kvantum-1.0.2.tar.gz
"
